<?php



//function for find the media files
   
    $compile=false;
     $com = bbcode('img',$com, $compile);
//      $com=str_replace('[img]', '<img onclick="return imageClick(this)" src="/urp/media/filter/small/img/',$com);
//      $com=str_replace('[/img]', '" alt="" />', $com);
//      print_r($imgdata);
//      
//      $imgr=
//      
      $com = bbcode('video', $com, $compile);
//      foreach ($imgdata as $img)
//          {
//            
//            echo $imgr;
//            echo '[img]'.$img.'[/img]';
//            $com=str_replace('[img]'.$img.'[/img]', $imgr, $com);
//          }
      
      
      $com=str_replace('[video]', '<div class="video-js-box"><video class="video-js" width="400" height="300" controls preload poster="">
      <source src="/urp/media/transfer/vid/',$com);
      $aperture="'avc1.42E01E, mp4a.40.2'";
       $com=str_replace('[/video]',  '" type="video/mp4; codecs='.$aperture.'" /></video></div>' , $com);
//     
      $com=str_replace('[audio]', '<div class="video-js-box"><video class="video-js" width="400" height="50" controls preload poster="">
      <source src="/urp/media/transfer/aud/',$com);
      
       $com=str_replace('[/audio]',  '" type="video/mp4; codecs='.$aperture.'" /></video></div>' , $com);
      
              
      echo  nl2br($com);
	  ?>